package com.mryang.hds.controller;

import com.mryang.hds.entity.Temp;
import com.mryang.hds.service.IDeisolationService;
import com.mryang.hds.utils.JWTUtil;
import com.mryang.hds.utils.ResultJson;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author Genius
 * @version 1.0.0
 * @ClassName DeisolationController.java
 * @Description TODO
 * @createTime 2023年04月04日 13:58:00
 */

@RestController
@RequestMapping("/api/deisolation")
public class DeisolationController {

    @Resource
    IDeisolationService iDeisolationService;

    // 申请提交
    @GetMapping("/deisolationSub")
    public ResultJson deisolationSub(HttpServletRequest httpServletRequest) {

        Integer userId = JWTUtil.getTokenInfoIndex(httpServletRequest.getHeader("token"));

        iDeisolationService.deisolationSub(userId);


        return ResultJson.success("申请提交成功");
    }
}
